<template>
  <div class="linenRinse-content">
          <div class="linenRinseBox">
                <div class="headerBox">
                      <div class="line"></div>
                      <div class="title">查看消毒产品证件信息</div>
                </div>
                <el-table :data="infoList" border>
                        <el-table-column label="产品名称" align="center" prop="productName" />
                        <el-table-column label="消毒产品生产商卫生许可证" align="center" prop="hygienicLicense" >
                        <template slot-scope="scope">
                                  <div class="preview" v-if="scope.row.hygienicLicense">
                                     <image-preview class="image" fit="cover" :src="scope.row.hygienicLicense" :preview-src-list="[scope.row.hygienicLicense]"></image-preview>
                                  </div>
                            </template>
                         </el-table-column >
                        <el-table-column label="产品卫生安全评价报告（产品备案凭证）" align="center" prop="safeReport">
                        <template slot-scope="scope">
                                  <div class="preview" v-if="scope.row.safeReport">
                                     <image-preview class="image" fit="cover" :src="scope.row.safeReport" :preview-src-list="[scope.row.safeReport]"></image-preview>
                                </div>
                            </template>
                         </el-table-column >
                        <el-table-column label="标签（含说明书）" align="center" prop="tag">
                              <template slot-scope="scope">
                                  <div class="preview" v-if="scope.row.tag">
                                     <image-preview class="image" fit="cover" :src="scope.row.tag" :preview-src-list="[scope.row.tag]"></image-preview>
                                </div>
                            </template>
                         </el-table-column >
                </el-table>
          </div>
           <pagination
              v-show="total>0"
              :total="total"
              :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize"
              @pagination="getDisinfectionCertificateFn"
            />
            <div class="bottomBtnCss">
                  <el-button @click="goBackBtn">返回</el-button>
            </div>

  </div>
</template>

<script>
  import { getDisinfectionCertificate} from "@/api/zhangping/publicPlaceHealth";
  export default {
    data() {
      return {
        queryParams: {
            pageNum: 1,
            pageSize: 10,
        },
        infoList:[],
        total:0,
      };
    },
    created() {
         this.getDisinfectionCertificateFn()
    },
    methods: {
        getDisinfectionCertificateFn(){
            getDisinfectionCertificate(this.queryParams).then(res=>{
                    if(res.code == 200){
                        this.infoList = res.rows
                        this.total = res.total
                    }else{
                        this.$message.error(res.msg);
                    }
            })
        },
        goBackBtn(){
          this.$router.back()
        },
    }
  };
</script>
<style lang="scss" scoped>
         .display-fx-center{
             display: flex;
             align-items: center;
         }
         .per100{
             width: 100%!important;
         }
         .soildTop{
             border-top:solid 1px  #D3D8E2;
         }
         .linenRinse-content{
              overflow-y: auto;
              position: relative;
              background-color: #fff;
              padding: 40px 20px;
              border-radius: 10px;
              height: calc( 100vh - 66px - 40px);
             .linenRinseBox{
                    padding-bottom:40px;

              }
           .headerBox{
                font-size: 16px;
                color: #484848;
                font-weight: bold;
                // margin-top:40px;/
                margin-bottom:15px;
                @extend .display-fx-center;
                .line{
                  width: 4px;
                  height: 12px;
                  background: #5D85FF;
                  border-radius: 6px 6px 6px 6px;
                  margin-right:6px;
                }
             }
          }
          .bottomBtnCss{
            margin-top: auto;
            text-align: right;
            position: absolute;
            bottom: 20px;
            right: 20px;
        }
        .preview{
              @extend .display-fx-center;
              justify-content: center;
        }
        ::v-deep{
           .el-table__header-wrapper th{
                 background: #F4F8FF!important;
           }
            .el-image,.el-image__inner{
               width: 80px!important;
               height: 30px!important;
               }
        }

</style>
